package com.zxinlee.storage.service.impl;

import com.zxinlee.storage.mapper.StorageMapper;
import com.zxinlee.storage.service.StorageService;
import com.zxinlee.storage.tcc.StorageTccAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StorageServiceImpl implements StorageService {

    //@Autowired
    //private StorageMapper storageMapper;

    @Autowired
    private StorageTccAction storageTccAction;

    @Override
    public void decrease(Long productId, Integer count) {
        //storageMapper.decrease(productId, count);
        storageTccAction.prepare(null,productId,count);
    }
}
